﻿/* ---- Phiếu thu tiền mặt ----  */

var jsPhieuThu =
{
	mId  : null,
	mTen : null,
	mSoCT : null,
	mNgayLap : null,
	mVuviecId : null,

	create : function()
    {
        var obj = new Object();

        obj.mId  = "";
	    obj.mTen  = "";
	    obj.mSoCT  = "";
	    obj.mNgayLap  = "";
	    obj.mVuviecId  = "";
	    
        return obj;
    }
};
/*   ----------------------------------   */

function onClientPopulated2(sender,e)
{

    var comletionList=$find("etCrl2").get_completionList();
    comletionList.style.width = "250px";
    for(i=0;i<comletionList.childNodes.length;i++)
    {   
        var _value=comletionList.childNodes[i]._value;       
        var text=_value[0];
        var moreText=_value[1];
        comletionList.childNodes[i]._value=moreText;
        comletionList.childNodes[i].innerHTML=
              "<div style=\"height:auto !important; display: inline-block !important;\">"
                          +  "<div style=\"width:40px;float:left; text-align:left; \">" + text + "</div>"
                          + "<div style=\"width:auto;float:left; \">" + moreText + "</div>"
                          +"</div>"
                         ;
    }
}

function onShowAComplete(strId) 
{
    var autoComplete = $find(strId);

    // To show the popup by JavaScript, following code is necessary.
    if(autoComplete)
    {
        // [NOTE] This trick is weak if the AutoCompleteExtender is updated.
        autoComplete._cache = {};

        autoComplete._currentPrefix = null;
        autoComplete._textBoxHasFocus = true;

        // save the old minimum prefix length, and set the value 0
        var oldMinimumPrefixLength = autoComplete.get_minimumPrefixLength();

        autoComplete.set_minimumPrefixLength(0);

        // send the event to show the popup
        autoComplete._onTimerTick(null, null);

        // restore the old minimum prefix length
        autoComplete.set_minimumPrefixLength(oldMinimumPrefixLength);
    }
}